<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8" />
		<title>Logon Cines</title>
		<meta name="author" content="Administrador" />
		<!--<link rel="stylesheet" href="../css/portrait.css" media="screen and (orientation: portrait), screen and  (max-width:715px)" />
		<link rel="stylesheet" href="../css/main.css" media="screen and (orientation: landscape) and (min-width:716px) " />-->
		<link rel="stylesheet" href="../css/compra.css" />
		<script src="../js/jquery-1.8.2.js"></script>
		<script src="../js/compra.js"></script>
	</head>
	<body>
		<div id="todo">			
<?php  
//Recibimos el id de la pelicula  
require 'conexion.php';
$idPel=$_GET['id'];

//Obtenemos todos los datos de la pelicula pasada
$res=mysql_query("SELECT * FROM peliculas WHERE idPelicula=$idPel;");
while($row=mysql_fetch_array($res)){
	echo "<div id=imagen><img src=.".$row['imagen']." /></div>"; 
	echo "<h3>Seleccione sesión y número de entradas</h3>";		
	echo "Pelicula : ".$row['nombrePelicula']."<br><br>";
	echo "<label hidden=hidden value=".$row['precio']." id=precio></label>";
	echo "<label hidden=hidden value=".$row['idPelicula']." id=idpelicula></label>";	
				
}


//Obtenemos las sesiones de la pelicula
$res2=mysql_query("SELECT * FROM  sesion WHERE sesion.idPelicula=$idPel;");
echo "Seleccione sesion: ";
echo "<select value=sesion id='sesion'>";
echo "<option selected></option>";
while($row2=mysql_fetch_array($res2)){
	echo "<option value=".$row2['idSesion'].">Fecha y Hora: ".$row2['fechaHora']."</option>";
	//$idSala=$row2['idSala'];		
}
echo "</select>";
//echo "<label hidden=hidden value=$idSala id=idsala></label>";
?>		
		<div id="div_num_tickets"><br>
			Numero de entradas: 
			<select id="num_tickets">
				<option selected></option>
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
				<option value="4">4</option>
				<option value="5">5</option>
			</select><div id="div_precio_total">	</div>
		</div>		
		<br>		
		<button id="continuar" >Continuar</button>
		<div id="validar"></div>
		</div>
	</body>
</html>